﻿using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace UEngine
{
    public class test : MonoBehaviour
    {

        // Use this for initialization
        IEnumerator testTask()
        {
            //yield return null;
            yield return  new Exception("!!!!!");
        }

        void testFunc()
        {
            throw new Exception("~~~~~~~~~~");
        }
        void Start()
        {
            DebugHelper.DebugMessageBox("2222222222");
            DebugHelper.DebugMessageBox("3333333333");
            DebugHelper.ErrorMessage("44444");
            try
            {
                StartCoroutine(testTask());
                //testFunc();
            }
            catch (Exception e)
            {
                Debug.Log("bbbb");
                Debug.Log(e.Message);
            }

            int i = 123;
            DebugHelper.ErrorMessage("123");
            Dictionary<int, string> temp = new Dictionary<int, string>();
            temp.Add(1, "1");
            temp.Add(2, "2");
            Debug.Log(temp[1]);
            
            string itemp = temp[1];
            itemp = "3";
            Debug.Log(temp[1]);
            temp[1] = "3";
            Debug.Log(temp[1]);

            Dictionary<int, List<string>> temp2 = new Dictionary<int, List<string>>();
            List<string> e1 = new List<string>();
            temp2.Add(1, e1);
            temp2[1].Add("fanzhengyong");
            temp2[1].Add("chengyan");
            foreach (string s in temp2[1])
            {
                Debug.Log(s);
            }
            

        }

        // Update is called once per frame
        void Update()
        {

        }
    }
    
}

